STEP 8: Now we can subtract the amount of the discount from the full price to find the sale price!

  • Click on . Drag another Float Variable into your program.
  • Change the name from my_var to sale_price.
  • Change what's to the right of the equals sign to price - discount.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)